package com.chushouya.common.util;

import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.Feature;
import com.chushouya.common.dto.suhuishou.ResponseDTO;
import com.general.framework.core.lang.Jsons;

import java.lang.reflect.Type;

public class FastJsonUtil {

    public static <T> ResponseDTO<T> parseResultV2(String json, Class<T> clazz) {
        return Jsons.parseObject(json, new TypeReference<ResponseDTO<T>>(new Type[]{clazz}) {
        }, new Feature[0]);
    }

    public static <T> ResponseDTO<T> parseProductData(String json, Class<T> clazz) {
        return null;
    }
}
